Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pass site or siteId to @netlify/config #1008

Merged
merged 2 commits into from
Jul 20, 2020
Merged

Conversation

RaeesBhatti
Copy link
Contributor

- Summary

Fixes: #959

- Test plan

- Description for the changelog

Use siteId or site flags as siteId as parameters to resolveConfig

- A picture of a cute animal (not mandatory but encouraged)
🐠

try {
return await resolveConfig({
config: argv.config,
cwd: cwd,
context: argv.context,
debug: argv.debug,
siteId: state.get('siteId'),
siteId: argv.siteId || typeof argv.site === 'string' && argv.site || state.get('siteId'),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we have any CLI flag called siteId instead of site?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, we have a site flag in netlify deploy

Copy link
Contributor

@ehmicky ehmicky Jul 20, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We have a site CLI flag in other commands as well. What about a siteId CLI flag?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The other site flag is a boolean. That's why I'm checking for typeof. We're checking for both siteId and a string site flag now.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am wondering if argv.siteId || could be removed since we don't have any siteId CLI flag at the moment?

@ehmicky
Copy link
Contributor

ehmicky commented Jul 20, 2020

CI tests seem to be failing due to linting.

@RaeesBhatti RaeesBhatti merged commit b94a00d into master Jul 20, 2020
@RaeesBhatti RaeesBhatti deleted the raees/pass-site-arg branch July 20, 2020 15:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Pass the --site CLI flag to @netlify/config
2 participants